//
//  AddStoreViewController.m
//  Manage
//
//  Created by 杨康 on 2017/11/15.
//  Copyright © 2017年 杨康. All rights reserved.
//

#import "AddStoreViewController.h"

@interface AddStoreViewController ()
@property(nonatomic,strong)ykTableView *tableView;
@end

@implementation AddStoreViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"添加门店";
    UIButton *leftButton=(UIButton *)self.navigationItem.leftBarButtonItem.customView;
    leftButton.selected=YES;
    
    
    self.tableView=[SingLeton myTableViewWithFrame:CGRectMake(0, TOP_HEIGHT+10, SCREEN_WIDTH, SCREEN_HEIGHT-TOP_HEIGHT-10) withRefresh:NO didSelect:^(ykTableView *tableView, NSIndexPath *indexPath) {
        
    }];
    [self.view addSubview:self.tableView];
    
    //系统cell
    [self.tableView.dataArray removeAllObjects];
    NSMutableArray *itemArr=[NSMutableArray array];
    
    
    
    cellData *dataObj=[[cellData alloc]init];
    dataObj.text=@"门店名称";
    dataObj.detailText=@"门店名称";
    
    cellData *dataObj2=[[cellData alloc]init];
    dataObj2.text=@"地址";
    dataObj2.detailText=@"我家在东北松花江上啊我家在东北松花江上啊";
    
    
    cellData *dataObj3=[[cellData alloc]init];
    dataObj3.text=@"联系人";
    dataObj3.detailText=@"某某某";
        
    
    cellData *dataObj4=[[cellData alloc]init];
    dataObj4.text=@"联系电话";
    dataObj4.detailText=@"13800000000";
    
    
    cellData *dataObj5=[[cellData alloc]init];
    dataObj5.text=@"联系电话";
    dataObj5.detailText=@"13800000000";
    
    cellData *dataObj6=[[cellData alloc]init];
    dataObj6.text=@"联系电话";
    dataObj6.detailText=@"13800000000";
    
    
    
    
    
    
    
    
    [itemArr addObject:dataObj];
    [itemArr addObject:dataObj2];
    [itemArr addObject:dataObj3];
    [itemArr addObject:dataObj4];
    [itemArr addObject:dataObj5];
    [itemArr addObject:dataObj6];
        
        
        
    
    [self.tableView.dataArray addObject:itemArr];
    [self.tableView reloadData];
    self.tableView.tableFooterView=[self customFootView];
}
-(UIView *)customFootView
{
    UIView *footView=[[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 110)];
    
    
    UIButton *saveBtn=[SingLeton endButton:[UIColor colorQ] andTitle:@"保存" RequestSuccess:^(UIButton *btn) {
        
    }];
    [footView addSubview:saveBtn];
    [saveBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15);
        make.top.mas_equalTo(20);
        make.size.mas_equalTo(CGSizeMake(SCREEN_WIDTH-30, 44));
    }];
    
    
    
    return footView;
}


@end
